package ModelImplementation

import "salary-paymment/Model"

type MailMethod struct {
	itsAddress string
}

func NewMailMethod(address string) *MailMethod {
	return &MailMethod{
		itsAddress : address,
	}
}

func (m *MailMethod) GetAddress() string {
	return m.itsAddress
}

//实现PaymentMethod中的Pay方法
func (m MailMethod)Pay(pc Model.Paycheck)  {
	pc.SetFields("Disposition", "Mail")
}